﻿@{
    ViewBag.Title = "Window";
    Layout = "/Areas/Admin/Views/Shared/AdminLayout.cshtml";
}

<table style="margin-left: 10px; font-size: 12px;">
    <tr>
        <td><label>充值金额</label></td>
        <td><input type="text" id="money" style="width: 300px;" /></td>
    </tr>
    <tr>
        <td colspan="2">
            <div class="botton" style="margin-left: 50px;" onclick="edit()">保存</div>
            <div class="botton" style="margin-left: 50px;" onclick="javascript: history.go(-1);">取消</div>
        </td>
    </tr>
</table>
<div style="width: 1000px; height: 40px; margin-top: 200px; "></div>
<script src="~/Scripts/basejs.js"></script>
<script>
   
    function edit() {
       
        var money = $("#money").val();
        if (CheckMoney(money) == 1) {
            alert("金额输入有误");
            return false;
        }
       
       
        $.post("@Url.Action("Editmoney")", { userid: '@ViewData["Id"]', money: money }, function (row) {
            if (row > 0) {
                alert("操作成功！");

            } else {
                alert("添加失败！");
            }
            location.href = "@Url.Action("Index")";

        });
    }


</script>

